//
//  CommonMethod.swift
//  YUANSHI
//
//  Created by pro on 2020/1/8.
//  Copyright © 2020 wangbin. All rights reserved.
//

import UIKit

//验证手机号
func checkPhoneNum(phoneText:String) -> Bool{
    let predicateStr = "^((13[0-9])|(15[^4,\\D]) |(17[0,0-9])|(18[0,0-9]))\\d{8}$"
    let predicate =  NSPredicate(format: "SELF MATCHES %@" ,predicateStr)
    let success = predicate.evaluate(with: phoneText)
    return success
    
}

